import request from "@/router/axios";

// export const login = (params) => request({
//   url: 'oauth/login',
//   method: 'post',
//   meta: {
//     isToken: false
//   },
//   data: params
// })

// ================================================== 校友卡
export const card_page = (params) =>
  request({
    url: "api/alumni/card/page",
    method: "get",
    params,
  });

export const card_edit = (params) =>
  request({
    url: "api/alumni/card/edit",
    method: "post",
    data: params,
  });

export const card_add = (params) =>
  request({
    url: "api/alumni/card/add",
    method: "post",
    data: params,
  });

export const card_delete = (params) =>
  request({
    url: "api/alumni/card/delete",
    method: "get",
    params,
  });

export const card_approve = (params) =>
  request({
    url: "api/alumni/card/approve",
    method: "POST",
    data: params,
  });

export const card_getCount = (params) =>
  request({
    url: "api/alumni/card/getCount",
    method: "get",
    params,
  });

  export const card_getLocationCard = (params) =>
    request({
      url: "api/alumni/card/getLocationCard",
      method: "get",
      params,
    });

// ================================================== 同学录

export const student_page = (params) =>
  request({
    url: "api/alumni/student/page",
    method: "get",
    params,
  });

  export const student_edit = (params) =>
    request({
      url: "api/alumni/student/edit",
      method: "post",
      data: params,
    });
  
  export const student_add = (params) =>
    request({
      url: "api/alumni/student/add",
      method: "post",
      data: params,
    });
  
  export const student_delete = (params) =>
    request({
      url: "api/alumni/student/delete",
      method: "get",
      params,
    })

// ================================================== 返校预约
export const reservation_page = (params) =>
  request({
    url: "api/alumni/reservation/page",
    method: "get",
    params,
  });

export const reservation_add = (params) =>
  request({
    url: "api/alumni/reservation/add",
    method: "post",
    data: params,
  });

export const reservation_edit = (params) =>
  request({
    url: "api/alumni/reservation/edit",
    method: "post",
    data: params,
  });

export const reservation_delete = (params) =>
  request({
    url: "api/alumni/reservation/delete",
    method: "get",
    params,
  });

export const reservation_approve = (params) =>
  request({
    url: "api/alumni/reservation/approve",
    method: "POST",
    data: params,
  });

// ======================================================校友活动

export const activity_page = (params) =>
  request({
    url: "api/alumni/activity/page",
    method: "get",
    params,
  });

export const activity_add = (params) =>
  request({
    url: "api/alumni/activity/add",
    method: "post",
    data: params,
  });

export const activity_edit = (params) =>
  request({
    url: "api/alumni/activity/edit",
    method: "post",
    data: params,
  });

export const activity_delete = (params) =>
  request({
    url: "api/alumni/activity/delete",
    method: "get",
    params,
  });

export const activity_users = (params) =>
  request({
    url: "api/alumni/activity/users",
    method: "get",
    params,
  });

export const activity_approve = (params) =>
  request({
    url: "api/alumni/activity/approve",
    method: "POST",
    data: params,
  });


  // ======================================================校友组织

export const org_page = (params) =>
  request({
    url: "api/alumni/org/page",
    method: "get",
    params,
  });

export const org_add = (params) =>
  request({
    url: "api/alumni/org/add",
    method: "post",
    data: params,
  });

export const org_edit = (params) =>
  request({
    url: "api/alumni/org/edit",
    method: "post",
    data: params,
  });

export const org_delete = (params) =>
  request({
    url: "api/alumni/org/delete",
    method: "get",
    params,
  });